import json

from example08 import Person

p1 = Person('骆昊', 40)
p2 = Person('王大锤', 18)
persons = [p1, p2]
# TypeError: Object of type Person is not JSON serializable
print(json.dumps({'persons': persons}))
